<%@ page language="java" contentType="text/html; charset=UTF-8"	 pageEncoding="UTF-8"%>
<%@ include file="../include/laypublic.jsp"%>
<!DOCTYPE html>
<html>
<head>
  <title>工作流节点详情</title>
</head>
<style>
	.layui-btn-red {
	    border: 1px dashed #FF0000;
	    background-color: #fff;
	    color: #555;
	}
	.layui-btn-red:hover{border-color:#FF0000;color:#333}
	.fieldset{
		margin-top: 5px;
		margin-bottom: 0px
	}
	.layui-legend{
		background-color:#5fb878;
		font-size:15px !important;
		width:140px;
	}
	.layui-form-item {
	    margin-bottom: 5px;
	    clear: both;
	    *zoom: 1;
	}
	.layui-form-label{
		width: 120px;
    	text-align: left;
    	margin-left: 90px;
    }
	.circle{
		width: 70px;
    	height: 70px;
    	line-height: 70px;
    	margin: 0 auto 10px;
    	text-align: center;
    	background-color: #009688;
    	cursor: pointer;
    	color: #fff;
    	border-radius: 50%;
    	padding: unset;
	}
	.marginset{
		margin:20px 0;
	}
	.width122{
		width: 182px;
		cursor: unset;
	}
	.layui-input-block {
		margin-left: 20px;
	}
	.layui-icon-search {
		cursor: pointer;
	}
	.margin-top5 {
		margin-top: 5px;
	}
</style>
<body>
<div class="layui-fluid">
    <div class="layui-card">
	    <div class="layui-tab-item layui-show">
			<div style="padding-top:15px;">&nbsp;</div>
		    <div class="layui-form" id="addInfo_form">
		       	<div class="layui-form-item">
		       		<div class="layui-inline">
			      		<label class="layui-form-label">模板名称</label>
			      		<div class="layui-input-inline">
			        		<input type="text" name="sname" value="${template.sname }" style="border:0px;" readonly="readonly" class="layui-input">
			      		</div>
			      	</div>
		       		<div class="layui-inline">
			      		<label class="layui-form-label">对应业务表单表名</label>
			      		<div class="layui-input-inline">
			        		<input type="text" name="srcBizTable" value="${template.srcBizTable }" style="border:0px;" readonly="readonly" class="layui-input">
			      		</div>
			      	</div>
			      	<div class="layui-inline">
			      		<label class="layui-form-label">分支标识</label>
			      		<div class="layui-input-inline">
			        		<input type="text" name="branchCode" value="${template.branchCode ==null?'--':template.branchCode}" maxlength="100" style="border:0px;" readonly="readonly" autocomplete="off" class="layui-input">
			      		</div>
			      	</div>
			    </div>
			    <div class="layui-form-item">
			   		<div class="layui-inline">
			      		<label class="layui-form-label">是否可修改</label>
			      		<div class="layui-input-inline">
				      		<select id="edit_from-bisModify" name="isEdit" style="border:0px;" disabled="disabled">
								<option value="1">可修改</option>
		    					<option value="0">不可修改</option>  
							</select>
			      		</div>
			      	</div>
				    <div class="layui-inline">
			      		<label class="layui-form-label" >备忘</label>
			      		<div class="layui-input-inline">
			      			<input type="text" name="memo"  value="${template.memo ==null?'--':template.memo }" style="width:220px;border:0px;" readonly="readonly" maxlength="200"  autocomplete="off" class="layui-input">
			      		</div>
			      	</div>
			    </div>
			    <div style="padding-top:15px;"></div>
			    <hr>
			    <div style="padding-top:15px;"></div>
			    <fieldset class="layui-elem-field layui-field-title fieldset" style="padding-top:10px;">
			  		<legend class="layui-btn layui-legend"  style="text-align:left;cursor:default;">节点配置  ></legend>
			  		<div class="layui-form-item marginset">
			  			<div class="layui-inline" id="linkRow1">
					      	<div class="layui-input-block">
					      		<a class="layui-btn width122">发起人</a>
					      		<i class="layui-icon layui-icon-right"></i>
					      	</div>
					      	<div class="layui-input-block margin-top5">
					      		<input type="text" value="" readonly="readonly" style="border:0px" autocomplete="off" class="layui-input">
					      	</div>
					      	<div class="layui-input-block margin-top5">
					      		<input type="text" value="" readonly="readonly" style="border:0px" autocomplete="off" class="layui-input">
					      	</div>
					      	<div class="layui-input-block margin-top5">
					      		<input type="text" value="" readonly="readonly" style="border:0px" autocomplete="off" class="layui-input">
					      	</div>
				      	</div>
				      	<c:forEach items="${template.nodes }" var="node" varStatus="status">
				      		<c:if test="${not status.first}">
					  			<div class="layui-inline" id="linkRow${status.index + 1}">
							      	<div class="layui-input-block">
							      		<input type="text" value="${node.nodeName }" name="nodeName${status.index + 1}" class="layui-btn width122" 	readonly>
							      		<i class="layui-icon layui-icon-right"></i>
							      	</div>
						      		<div class="layui-input-block width122 margin-top5">
										<input type="text" value="${node.nodePolicy == 1 ? '权限：审批':'权限：知会'}" readonly="readonly" style="border:0px" class="layui-input">
								    </div>
						      		<div class="layui-input-block width122 margin-top5">
										<input type="text" value="${node.routeFlag == 1 ? '标识：固定人员':node.routeFlag == 2 ? '标识：本部门内':node.routeFlag == 3 ? '标识：本公司内':node.routeFlag == 4 ? '标识：上级区域公司':node.routeFlag == 5 ? '标识：总部公司':''}" readonly="readonly" style="border:0px" class="layui-input">
								    </div>
							      	<div class="layui-input-block width122 margin-top5">
							      		<input <c:if test="${node.routeFlag != 1}">style="display:none"</c:if> type="text" value="审批人：${node.checkUserName }" readonly="readonly" style="border:0px" class="layui-input">
					      				<input <c:if test="${node.routeFlag == 1}">style="display:none"</c:if> type="text" value="名称：${node.chooseKey }" name="chooseKey${status.index + 1}" readonly style="border:0px" class="layui-input"/>
							      	</div>
						      	</div>
					      	</c:if>
				      	</c:forEach>
				    </div>
			  	</fieldset>
			</div>
  		</div>
	</div>
</div>
  <script>
  
  layui.config({
	    base: '${ctx}/resources/layuiadmin/' //静态资源所在路径
	  }).extend({
	    index: 'lib/index' //主入口模块
	  }).use(['index', 'set' , 'table'], function(){
	    var $ = layui.$
	    ,table = layui.table
	    ,form = layui.form;
	    //监听行单击事件然后选中行
	    /*table.on('row(LAY-user-back-manage)', function(obj){
		    var tr = obj.tr;
		    tr.addClass('layui-table-click').siblings().removeClass('layui-table-click');//选中行样式
            tr.find('input[lay-type="layTableRadio"]').prop("checked",true);
		    layui.form.render();
	    });*/
	    $('#edit_from-bisModify').val('${template.isEdit}');
	    form.render();
	  });
  </script>
</body>
</html>

